package com.jwm.power.repository;

import com.jwm.power.model.entity.Users;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.repository.query.Param;

import java.util.List;
public interface UsersRepository extends JpaRepository<Users, Integer>, JpaSpecificationExecutor<Users> {
    Users findByUsernameAndUserpassword(@Param("username") String username,@Param("userpassword") String userpassword);
    Users findByUsernameAndUseridNot(@Param("username") String username,@Param("userid") Integer userid);
    Users findByUserid(@Param("userid") Integer userid);
    List<Users> findByDeptcodeIn(@Param("deptcode") String[] deptcode);

}
